<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<script type="text/javascript" src="../statics/js/jquery-1.12.4.js"></script>
		<script type="text/javascript" src="../statics/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="../statics/js/jquery-1.12.4.js"></script>
		<!--<script type="text/javascript" src="../statics/js/wg/jquery.min.js" ></script>-->
		<script type="text/javascript" src="../statics/js/wg/bootstrap.min.js"></script>
		<script type="text/javascript" src="../statics/js/wg/bootstrap-chinese-region.js"></script>
<title>三责投保</title>
<style type="text/css">
	.aaaa{
				margin: 0em;
				padding: 0em;
				width: 100%;
				position: absolute;
					}
		.herd1{
			width: 98%;
			height: 3em;
			background-color: #87CEEB;
			text-align: center;
			line-height: 3em;
			font-size: 1.5em;
			color: #FFFFFF;
		}
		.xin{
			font-size: 1.5em;
			line-height: 3em;
		}
		.xin p{
			margin-left: 1em;
			
		}	
		.xin p:nth-of-type(3){
			margin-left: 1.1em;
			
		}		
				.afhsy{
		color: white;
		display: block;
		width: 100%;
		height: 4em;
		line-height: 4em;
		text-decoration: none;
		text-align: center;
		font-size: 1em;
	}
	.aad{
		position: absolute;
	     top: 30em;
	     left:0em;
		width: 100%;
		background: #87CEEB;
	}	
	#Button1{
		border: 1px solid #87CEEB;
				bottom: 0em;
				padding: 0em;
				width: 99%;
			width: 96%;
			height: 3em;
			background-color: #87CEEB;
			text-align: center;
			line-height: 3em;
			font-size: 1.5em;
			color: #FFFFFF;
		}
			.namea{
					width: 14em;
					border-style:none;
					text-align: center;
					height: 2em;
					margin-top: -1.5em;
			}
			
</style>
</head>
<body>
				<div class="container-fluid aaaa">
				<div  class= "col-xs-12 herd1">
				  <p>三责投保</p>					
				</div>
				<form action="insetcar" id="form001" method="post">
					<div class="xin">
						<p>被&nbsp;&nbsp;保&nbsp;&nbsp;人:<input type="text" name="insuredname"  id="insuredname"  class="namea"  placeholder="&nbsp;&nbsp;&nbsp;请输入被保人"/></p>	
						<p>手&nbsp;&nbsp;机&nbsp;&nbsp;号:<input type="text" name="insuredphone" id="phone" class="namea" placeholder="&nbsp;&nbsp;&nbsp;请输入手机号"/></p>	
						<p>身份证号:<input type="text" name="identity" id="identity"   class="namea"  placeholder="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;请输入身份证号"/></p>
					     <input type="text" name="insuranceid" value="2" hidden="hidden"/>
					</div>
						<input id="Button1"  type="submit" value="立即购买" class="submit"  />
				</form>
				</div>
				
</body>
		<script type="text/javascript">
		$(function() {
			$("#form001").submit(function() {
				
			
				var insuredname = $("#insuredname").val();
				var phone = $("#phone").val();
				var identity = $("#identity").val();
			
				var $casephone1 = $("#phone").val();
				var $identity1 = $("#identity").val();
				
				var regmobile = /^1\d{10}$/;
				var id=/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
				
				if(insuredname==null || insuredname ==""){
					alert("请输入被保人");
					return false;
				}
			
				else if(phone==null || phone ==""){
					alert("请输入电话");
					return false;
				}
				else if(regmobile.test($casephone1)==false){
						alert("手机号码格式不正确");
						return false;
					
				}
				else if(identity==null || identity ==""){
					alert("请选择被保人证件号");
					return false;
				}else if(id.test($identity1)==false){
					alert("证件号格式不正确");
					return false;
				}
			});

		});
	</script>

</html>